<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jsonp</title>
    <script src="https://cdn.bootcss.com/angular.js/1.5.8/angular.min.js"></script>
</head>
<body>
        <div ng-app="myApp" ng-controller="myControl">
            <div>百度搜索</div>
            <input id="input" type="text" ng-model="word" ng-change="ch()">
            <div ng-repeat="item in arr">{{item}}</div>
        </div>
</body>
<script>

    var app= angular.module('myApp',[]);
    app.controller('myControl',function ($scope,$http) {
        $scope.word='';
        $scope.ch=function(){
            $http.jsonp('https://sp0.baidu.com/' +
                    '5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd='+$scope.word+'&cb=JSON_CALLBACK').then(function (res) {
//                console.log(res.data.s);
                $scope.arr=res.data.s;

            },function (err) {
                console.log(err);
            })
        }




    })
</script>
</html>